﻿<template>
    <div v-cloak class="flex-column" style="background-color: #F7F7F8; ">
        <component is="style" />
        <div class="flex-column-fill">
          
        </div>
    </div>
</template>
<script>
    module = (function (hxt) {
        return {
            name: 'piaofang',
            data: function () {
                return {
                    optor: hxt.store.optor,
                    browser: hxt.wxBrowser(), // 1：手机微信；4：小程序
                    urlList: [],
                    active: 0,
                    list: [],
                    current: 0,
                    hasMore: false,
                    pageIndex:1
                };
            },
            computed: {

            },
            activated: function () {

            },
            watch: {
                active: function (val) {
                    var _this = this;
                    _this.list = [];
                    _this.pageIndex = 1;
                    _this.loadList();
                }
            },
            mounted: function () {
                var _this = this;
                _this.$parent.showHome = true;

                _this.loadList();
            },
            methods: {
                loadList: function () {
                    var _this = this;
                    hxt.post({
                        url: "https://api.suyanw.cn/api/piaofang.php?type=json",
                        data: { type: 2 },
                        ok: function (res) {
                            if (res.code != 0) {
                                hxt.error("加载失败：" + res.errmsg);
                                return;
                            };
                            _this.list = res.data;
                        }
                    })
                },
                
            },
            components: {

            }
        };
    })(window.$jscript.fn);
</script>
<style>
    .van-icon-x {
        display: block;
        height: 28px;
        width: 28px;
        text-align: center;
        line-height: 28px !important;
        font-size: 18px !important;
        border-radius: 3px;
    }

    .color-card {
        background-color: #00AA95;
        color: #FFF;
    }

    .color-app {
        background-color: #4B7DFF;
        color: #FFF;
    }

    .bg-mauve {
        background-color: #9c26b0;
        color: #FFF;
    }

    .bg-jxhd {
        background-color: #02995B;
        color: #FFF;
    }
</style>